/* 
 * File:   camcal.h
 * Author: gustavo
 *
 * Created on December 26, 2011, 2:10 AM
 */

#ifndef CAMCAL_H
#define	CAMCAL_H

#ifdef	__cplusplus
extern "C" {
#endif

#include <gtk/gtk.h>

#include <v4li/v4li.h>
#include <imp/image/image.h>

	typedef struct _camcal CamCal;

	struct _camcal {
		
		v4lInterface * v4li;

		GtkHBox * box;
		GtkDrawingArea * da_image;
		ImpImage * image_rgb;
		ImpImage * image_gray;

		GtkSpinButton * spb_vertex_nx;
		GtkSpinButton * spb_vertex_ny;
		GtkSpinButton * spb_square_size;
		GtkSpinButton * spb_frame_step;
		GtkSpinButton * spb_n_images;

		GtkTreeView * treeview;
		GtkListStore * lstore_images;

		GtkToggleButton * btg_capture;

		GtkButton * bt_clear;
		GtkButton * bt_delete;

		GtkButton * bt_calibre;

		int ct_x;
		int ct_y;
		float ct_square_size;
		int ct_frame_count;
		int ct_frame_step;
		int ct_n_images;
		int ct_image_count;
		int ct_image_count_name;
		boolean ct_capture;

		int handle_loop;
	};

	CamCal * cc_new(void);
	void cc_show(CamCal * ccp);


#ifdef	__cplusplus
}
#endif

#endif	/* CAMCAL_H */

